#include <../inc/pid.h>

float pre_error;
float integral;

int pid_control(float *pid,float temp,float target){

    float error=target-temp;
    float derivative=error-pre_error;
    float output;

    integral+=error;
    pre_error=error;

    *pid=k_p*error+k_i*integral+k_d*derivative;

}